package com.youlu.campus.admin.statistics;


import com.youlu.campus.entity.pay.statistics.vo.PayButtonStatisticsQueryReq;
import com.youlu.campus.service.statistics.PayButtonStatisticsService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class PayPageStatisticsController {

    @Autowired
    private PayButtonStatisticsService payButtonStatisticsService;


    @GetMapping("/statistics/pay/page/config")
    public QResult pageConfig(@RequestParam String activityId){
        return QResult.success(payButtonStatisticsService.findByActivityId(activityId));
    }

    @PostMapping("/statistics/pay/button/list")
    public QResult listPayButtonStatistics(@RequestBody PayButtonStatisticsQueryReq queryReq){
        return QResult.success(payButtonStatisticsService.list(queryReq));
    }

    @PostMapping("/statistics/pay/button/databoard")
    public QResult dataBoard(@RequestBody PayButtonStatisticsQueryReq queryReq){
        return QResult.success(payButtonStatisticsService.dataBoard(queryReq));
    }

}
